"""
learning python using exercism.org
"""
EXPECTED_BAKE_TIME = 40
PREPARATION_TIME = 2


def bake_time_remaining(elapsed_bake_time):
    """
    calculate bake time remaining
    :param elapsed_bake_time: int elapsed bake time
    :return: int left time
    """
    return EXPECTED_BAKE_TIME - elapsed_bake_time


def preparation_time_in_minutes(number_of_layers):
    """
    get layer preparation time in minutes unit
    :param number_of_layers: int layers number
    :return: int preparation minutes
    """

    return PREPARATION_TIME * number_of_layers


def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time):
    """
        Return elapsed cooking time.
    :param number_of_layers: int number of layers
    :param elapsed_bake_time: int elapsed bake time
    :return int elapsed_time in minutes

        This function takes two numbers representing the number of layers & the time already spent
        baking and calculates the total elapsed minutes spent cooking the lasagna.
    """
    return preparation_time_in_minutes(number_of_layers) + elapsed_bake_time
